Optimal. Leaf size=127 \[ -\frac{\left (3 a^2-12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{8 \sqrt{b}}-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}-\frac{1}{8} (5 a-4 b) \cot (x) \sqrt{a+b \cot ^2(x)}+(a-b)^{3/2} \tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.229799, antiderivative size = 127, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.471, Rules used = {3670, 477, 582, 523, 217, 206, 377, 203} \[ -\frac{\left (3 a^2-12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{8 \sqrt{b}}-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}-\frac{1}{8} (5 a-4 b) \cot (x) \sqrt{a+b \cot ^2(x)}+(a-b)^{3/2} \tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 477
Rule 582
Rule 523
Rule 217
Rule 206
Rule 377
Rule 203
Rubi steps
\begin{align*} \int \cot ^2(x) \left (a+b \cot ^2(x)\right )^{3/2} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2 \left (a+b x^2\right )^{3/2}}{1+x^2} \, dx,x,\cot (x)\right )\\ &=-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}-\frac{1}{4} \operatorname{Subst}\left (\int \frac{x^2 \left (a (4 a-3 b)+(5 a-4 b) b x^2\right )}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )\\ &=-\frac{1}{8} (5 a-4 b) \cot (x) \sqrt{a+b \cot ^2(x)}-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}+\frac{\operatorname{Subst}\left (\int \frac{a (5 a-4 b) b-b \left (3 a^2-12 a b+8 b^2\right ) x^2}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )}{8 b}\\ &=-\frac{1}{8} (5 a-4 b) \cot (x) \sqrt{a+b \cot ^2(x)}-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}+(a-b)^2 \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )+\frac{1}{8} \left (-3 a^2+12 a b-8 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\cot (x)\right )\\ &=-\frac{1}{8} (5 a-4 b) \cot (x) \sqrt{a+b \cot ^2(x)}-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}+(a-b)^2 \operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )+\frac{1}{8} \left (-3 a^2+12 a b-8 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )\\ &=(a-b)^{3/2} \tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )-\frac{\left (3 a^2-12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{8 \sqrt{b}}-\frac{1}{8} (5 a-4 b) \cot (x) \sqrt{a+b \cot ^2(x)}-\frac{1}{4} b \cot ^3(x) \sqrt{a+b \cot ^2(x)}\\ \end{align*}
Mathematica [A] time = 1.14985, size = 253, normalized size = 1.99 \[ \frac{\csc (x) \sqrt{(a-b) \cos (2 x)-a-b} \left (\sqrt{a-b} \left (\sqrt{-b} \cot (x) \csc (x) \sqrt{(a-b) \cos (2 x)-a-b} \left (5 a+2 b \csc ^2(x)-6 b\right )-\sqrt{2} \left (3 a^2-12 a b+8 b^2\right ) \tanh ^{-1}\left (\frac{\sqrt{2} \sqrt{-b} \cos (x)}{\sqrt{(a-b) \cos (2 x)-a-b}}\right )\right )+8 \sqrt{2} \sqrt{-b} (a-b)^2 \tanh ^{-1}\left (\frac{\sqrt{2} \sqrt{a-b} \cos (x)}{\sqrt{(a-b) \cos (2 x)-a-b}}\right )\right )}{8 \sqrt{2} \sqrt{-b} \sqrt{a-b} \sqrt{\csc ^2(x) (-((a-b) \cos (2 x)-a-b))}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.026, size = 286, normalized size = 2.3 \begin{align*} -{\frac{\cot \left ( x \right ) }{4} \left ( a+b \left ( \cot \left ( x \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}}-{\frac{3\,a\cot \left ( x \right ) }{8}\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}-{\frac{3\,{a}^{2}}{8}\ln \left ( \cot \left ( x \right ) \sqrt{b}+\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}} \right ){\frac{1}{\sqrt{b}}}}+{\frac{b\cot \left ( x \right ) }{2}\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}+{\frac{3\,a}{2}\sqrt{b}\ln \left ( \cot \left ( x \right ) \sqrt{b}+\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}} \right ) }-{b}^{{\frac{3}{2}}}\ln \left ( \cot \left ( x \right ) \sqrt{b}+\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}} \right ) +{\frac{1}{a-b}\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\cot \left ( x \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \right ) }-2\,{\frac{a\sqrt{{b}^{4} \left ( a-b \right ) }}{b \left ( a-b \right ) }\arctan \left ({\frac{ \left ( a-b \right ){b}^{2}\cot \left ( x \right ) }{\sqrt{{b}^{4} \left ( a-b \right ) }\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}} \right ) }+{\frac{{a}^{2}}{ \left ( a-b \right ){b}^{2}}\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\cot \left ( x \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \cot \left (x\right )^{2} + a\right )}^{\frac{3}{2}} \cot \left (x\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.01435, size = 2689, normalized size = 21.17 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \cot ^{2}{\left (x \right )}\right )^{\frac{3}{2}} \cot ^{2}{\left (x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]